<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN" "http://www.w3.org/TR/REC-html40/strict.dtd">

<html><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8"><title>URLUtil</title><link rel="stylesheet" type="text/css" href="../../../../styles/main.css"><script language=JavaScript src="../../../../javascript/main.js"></script><script language=JavaScript src="../../../../javascript/prettify.js"></script><script language=JavaScript src="../../../../javascript/searchdata.js"></script></head><body class="ContentPage" onLoad="NDOnLoad();prettyPrint();"><script language=JavaScript><!--
if (browserType) {document.write("<div class=" + browserType + ">");if (browserVer) {document.write("<div class=" + browserVer + ">"); }}// --></script>

<!--  Generated by Natural Docs, version 1.52 -->
<!--  http://www.naturaldocs.org  -->

<!-- saved from url=(0026)http://www.naturaldocs.org -->




<div id=Content><div class="CClass"><div class=CTopic id=MainTopic><h1 class=CTitle><a name="URLUtil"></a>URLUtil</h1><div class=CBody><p>Various URL / URI lookup and manipulation functions.</p><h4 class=CHeading>Author</h4><p>Patrick Bay  The MIT License (MIT)  Copyright &copy; 2013 Patrick Bay  Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the &ldquo;Software&rdquo;), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:  The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.&nbsp;  THE SOFTWARE IS PROVIDED &ldquo;AS IS&rdquo;, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.&nbsp; IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.&nbsp; </p><!--START_ND_SUMMARY--><div class=Summary><div class=STitle>Summary</div><div class=SBorder><table border=0 cellspacing=0 cellpadding=0 class=STable><tr class="SMain"><td class=SEntry><a href="#URLUtil" >URLUtil</a></td><td class=SDescription>Various URL / URI lookup and manipulation functions.</td></tr><tr class="SGroup SIndent1"><td class=SEntry><a href="#URLUtil.Functions" >Functions</a></td><td class=SDescription></td></tr><tr class="SFunction SIndent2 SMarked"><td class=SEntry><a href="#URLUtil.getServerNameWithPort" id=link1 onMouseOver="ShowTip(event, 'tt1', 'link1')" onMouseOut="HideTip('tt1')">getServerNameWithPort</a></td><td class=SDescription>Returns the domain and port information from the specified URL.</td></tr><tr class="SFunction SIndent2"><td class=SEntry><a href="#URLUtil.getServerName" id=link2 onMouseOver="ShowTip(event, 'tt2', 'link2')" onMouseOut="HideTip('tt2')">getServerName</a></td><td class=SDescription>Returns the server name from the specified URL.</td></tr><tr class="SFunction SIndent2 SMarked"><td class=SEntry><a href="#URLUtil.getResourcePath" id=link3 onMouseOver="ShowTip(event, 'tt3', 'link3')" onMouseOut="HideTip('tt3')">getResourcePath</a></td><td class=SDescription>Returns the resource path portion (everything after protocol+domain+port) of the specified URL.</td></tr><tr class="SFunction SIndent2"><td class=SEntry><a href="#URLUtil.getPort" id=link4 onMouseOver="ShowTip(event, 'tt4', 'link4')" onMouseOut="HideTip('tt4')">getPort</a></td><td class=SDescription>Returns the port number from the specified URL.</td></tr><tr class="SFunction SIndent2 SMarked"><td class=SEntry><a href="#URLUtil.getFullURL" id=link5 onMouseOver="ShowTip(event, 'tt5', 'link5')" onMouseOut="HideTip('tt5')">getFullURL</a></td><td class=SDescription>Converts a potentially relative URL to a fully-qualified URL. </td></tr><tr class="SFunction SIndent2"><td class=SEntry><a href="#URLUtil.isHttpURL" id=link6 onMouseOver="ShowTip(event, 'tt6', 'link6')" onMouseOut="HideTip('tt6')">isHttpURL</a></td><td class=SDescription>Determines if the URL uses the HTTP, HTTPS, or RTMP protocol.</td></tr><tr class="SFunction SIndent2 SMarked"><td class=SEntry><a href="#URLUtil.isHttpsURL" id=link7 onMouseOver="ShowTip(event, 'tt7', 'link7')" onMouseOut="HideTip('tt7')">isHttpsURL</a></td><td class=SDescription>Determines if the URL uses the secure HTTPS protocol.</td></tr><tr class="SFunction SIndent2"><td class=SEntry><a href="#URLUtil.getProtocol" id=link8 onMouseOver="ShowTip(event, 'tt8', 'link8')" onMouseOut="HideTip('tt8')">getProtocol</a></td><td class=SDescription>Returns the protocol section of the specified URL. </td></tr><tr class="SFunction SIndent2 SMarked"><td class=SEntry><a href="#URLUtil.replaceProtocol" id=link9 onMouseOver="ShowTip(event, 'tt9', 'link9')" onMouseOut="HideTip('tt9')">replaceProtocol</a></td><td class=SDescription>Replaces the protocol of the specified URI with the given protocol.</td></tr><tr class="SFunction SIndent2"><td class=SEntry><a href="#URLUtil.replacePort" id=link10 onMouseOver="ShowTip(event, 'tt10', 'link10')" onMouseOut="HideTip('tt10')">replacePort</a></td><td class=SDescription>Returns a new String with the port replaced with the specified port. </td></tr><tr class="SFunction SIndent2 SMarked"><td class=SEntry><a href="#URLUtil.replaceTokens" id=link11 onMouseOver="ShowTip(event, 'tt11', 'link11')" onMouseOut="HideTip('tt11')">replaceTokens</a></td><td class=SDescription>Returns a new String with the port and server tokens replaced with the port and server from the currently running application.</td></tr><tr class="SFunction SIndent2"><td class=SEntry><a href="#URLUtil.urisEqual" id=link12 onMouseOver="ShowTip(event, 'tt12', 'link12')" onMouseOut="HideTip('tt12')">urisEqual</a></td><td class=SDescription>Tests whether two URI Strings are equivalent, ignoring case and differences in trailing slashes.</td></tr><tr class="SFunction SIndent2 SMarked"><td class=SEntry><a href="#URLUtil.trim" id=link13 onMouseOver="ShowTip(event, 'tt13', 'link13')" onMouseOut="HideTip('tt13')">trim</a></td><td class=SDescription>Removes all whitespace characters from the beginning and end of the specified string.</td></tr><tr class="SFunction SIndent2"><td class=SEntry><a href="#URLUtil.isWhitespace" id=link14 onMouseOver="ShowTip(event, 'tt14', 'link14')" onMouseOut="HideTip('tt14')">isWhitespace</a></td><td class=SDescription>Returns true if the specified string is a single space, tab, carriage return, newline, or formfeed character.</td></tr><tr class="SFunction SIndent2 SMarked"><td class=SEntry><a href="#URLUtil.hasUnresolvableTokens" id=link15 onMouseOver="ShowTip(event, 'tt15', 'link15')" onMouseOut="HideTip('tt15')">hasUnresolvableTokens</a></td><td class=SDescription>If the LoaderConfig.url property is not available, the replaceTokens() method will not replace the server name and port properties properly.</td></tr><tr class="SGroup SIndent1"><td class=SEntry><a href="#URLUtil.Constants" >Constants</a></td><td class=SDescription></td></tr><tr class="SConstant SIndent2 SMarked"><td class=SEntry><a href="#URLUtil.SERVER_NAME_TOKEN" id=link16 onMouseOver="ShowTip(event, 'tt16', 'link16')" onMouseOut="HideTip('tt16')">SERVER_NAME_TOKEN</a></td><td class=SDescription>The pattern in the String that is passed to the &lt;code&gt;replaceTokens()&lt;/code&gt; method that is replaced by the application&rsquo;s server name.</td></tr><tr class="SConstant SIndent2"><td class=SEntry><a href="#URLUtil.SERVER_PORT_TOKEN" id=link17 onMouseOver="ShowTip(event, 'tt17', 'link17')" onMouseOut="HideTip('tt17')">SERVER_PORT_TOKEN</a></td><td class=SDescription>The pattern in the String that is passed to the &lt;code&gt;replaceTokens()&lt;/code&gt; method that is replaced by the application&rsquo;s port.</td></tr><tr class="SGroup SIndent1"><td class=SEntry><a href="#URLUtil.Functions" >Functions</a></td><td class=SDescription></td></tr><tr class="SFunction SIndent2 SMarked"><td class=SEntry><a href="#URLUtil.objectToString" id=link18 onMouseOver="ShowTip(event, 'tt18', 'link18')" onMouseOut="HideTip('tt18')">objectToString</a></td><td class=SDescription>Enumerates an object&rsquo;s dynamic properties (by using a for..in loop) and returns a String. </td></tr><tr class="SFunction SIndent2"><td class=SEntry><a href="#URLUtil.internalObjectToString" id=link19 onMouseOver="ShowTip(event, 'tt19', 'link19')" onMouseOut="HideTip('tt19')">internalObjectToString</a></td><td class=SDescription></td></tr><tr class="SFunction SIndent2 SMarked"><td class=SEntry><a href="#URLUtil.internalArrayToString" id=link20 onMouseOver="ShowTip(event, 'tt20', 'link20')" onMouseOut="HideTip('tt20')">internalArrayToString</a></td><td class=SDescription></td></tr><tr class="SFunction SIndent2"><td class=SEntry><a href="#URLUtil.stringToObject" id=link21 onMouseOver="ShowTip(event, 'tt21', 'link21')" onMouseOut="HideTip('tt21')">stringToObject</a></td><td class=SDescription>Returns an object from a String. </td></tr><tr class="SGroup SIndent1"><td class=SEntry><a href="#URLUtil.Constants" >Constants</a></td><td class=SDescription></td></tr><tr class="SConstant SIndent2 SMarked"><td class=SEntry><a href="#URLUtil.SERVER_NAME_REGEX" id=link22 onMouseOver="ShowTip(event, 'tt22', 'link22')" onMouseOut="HideTip('tt22')">SERVER_NAME_REGEX</a></td><td class=SDescription></td></tr><tr class="SConstant SIndent2"><td class=SEntry><a href="#URLUtil.SERVER_PORT_REGEX" id=link23 onMouseOver="ShowTip(event, 'tt23', 'link23')" onMouseOut="HideTip('tt23')">SERVER_PORT_REGEX</a></td><td class=SDescription></td></tr></table></div></div><!--END_ND_SUMMARY--></div></div></div>

<div class="CGroup"><div class=CTopic><h3 class=CTitle><a name="URLUtil.Functions"></a>Functions</h3></div></div>

<div class="CFunction"><div class=CTopic><h3 class=CTitle><a name="URLUtil.getServerNameWithPort"></a>getServerNameWithPort</h3><div class=CBody><blockquote><table border=0 cellspacing=0 cellpadding=0 class="Prototype"><tr><td><table border=0 cellspacing=0 cellpadding=0><tr><td class="PBeforeParameters  prettyprint "nowrap>public static function getServerNameWithPort(</td><td class="PParameter  prettyprint " nowrap>url:</td><td class="PType  prettyprint " nowrap>&nbsp;String</td><td class="PAfterParameters  prettyprint "nowrap>):String</td></tr></table></td></tr></table></blockquote><p>Returns the domain and port information from the specified URL.</p><h4 class=CHeading>Parameters</h4><table border=0 cellspacing=0 cellpadding=0 class=CDescriptionList><tr><td class=CDLEntry>url</td><td class=CDLDescription>The URL to analyze.</td></tr></table><h4 class=CHeading>Returns</h4><p>The server name and port of the specified URL.&nbsp; </p></div></div></div>

<div class="CFunction"><div class=CTopic><h3 class=CTitle><a name="URLUtil.getServerName"></a>getServerName</h3><div class=CBody><blockquote><table border=0 cellspacing=0 cellpadding=0 class="Prototype"><tr><td><table border=0 cellspacing=0 cellpadding=0><tr><td class="PBeforeParameters  prettyprint "nowrap>public static function getServerName(</td><td class="PParameter  prettyprint " nowrap>url:</td><td class="PType  prettyprint " nowrap>&nbsp;String</td><td class="PAfterParameters  prettyprint "nowrap>):String</td></tr></table></td></tr></table></blockquote><p>Returns the server name from the specified URL.</p><h4 class=CHeading>Parameters</h4><table border=0 cellspacing=0 cellpadding=0 class=CDescriptionList><tr><td class=CDLEntry>url</td><td class=CDLDescription>The URL to analyze.</td></tr></table><h4 class=CHeading>Returns</h4><p>The server name of the specified URL.&nbsp; </p></div></div></div>

<div class="CFunction"><div class=CTopic><h3 class=CTitle><a name="URLUtil.getResourcePath"></a>getResourcePath</h3><div class=CBody><blockquote><table border=0 cellspacing=0 cellpadding=0 class="Prototype"><tr><td><table border=0 cellspacing=0 cellpadding=0><tr><td class="PBeforeParameters  prettyprint "nowrap>public static function getResourcePath(</td><td class="PParameter  prettyprint " nowrap>url:</td><td class="PType  prettyprint " nowrap>&nbsp;String</td><td class="PAfterParameters  prettyprint "nowrap>):String</td></tr></table></td></tr></table></blockquote><p>Returns the resource path portion (everything after protocol+domain+port) of the specified URL.</p><h4 class=CHeading>Parameters</h4><table border=0 cellspacing=0 cellpadding=0 class=CDescriptionList><tr><td class=CDLEntry>url</td><td class=CDLDescription>The URL to analyze.</td></tr></table><h4 class=CHeading>Returns</h4><p>The resource portion of the specified URL.&nbsp; </p></div></div></div>

<div class="CFunction"><div class=CTopic><h3 class=CTitle><a name="URLUtil.getPort"></a>getPort</h3><div class=CBody><blockquote><table border=0 cellspacing=0 cellpadding=0 class="Prototype"><tr><td><table border=0 cellspacing=0 cellpadding=0><tr><td class="PBeforeParameters  prettyprint "nowrap>public static function getPort(</td><td class="PParameter  prettyprint " nowrap>url:</td><td class="PType  prettyprint " nowrap>&nbsp;String</td><td class="PAfterParameters  prettyprint "nowrap>):uint</td></tr></table></td></tr></table></blockquote><p>Returns the port number from the specified URL.</p><h4 class=CHeading>Parameters</h4><table border=0 cellspacing=0 cellpadding=0 class=CDescriptionList><tr><td class=CDLEntry>url</td><td class=CDLDescription>The URL to analyze.</td></tr></table><h4 class=CHeading>Returns</h4><p>The port number of the specified URL.&nbsp; </p></div></div></div>

<div class="CFunction"><div class=CTopic><h3 class=CTitle><a name="URLUtil.getFullURL"></a>getFullURL</h3><div class=CBody><blockquote><table border=0 cellspacing=0 cellpadding=0 class="Prototype"><tr><td><table border=0 cellspacing=0 cellpadding=0><tr><td class="PBeforeParameters  prettyprint "nowrap>public static function getFullURL(</td><td class="PParameter  prettyprint " nowrap>rootURL:</td><td class="PType  prettyprint " nowrap>&nbsp;String,</td></tr><tr><td></td><td class="PParameter  prettyprint " nowrap>url:</td><td class="PType  prettyprint " nowrap>&nbsp;String</td><td class="PAfterParameters  prettyprint "nowrap>):String</td></tr></table></td></tr></table></blockquote><p>Converts a potentially relative URL to a fully-qualified URL.&nbsp; If the URL is not relative, it is returned as is.&nbsp; If the URL starts with a slash, the host and port from the root URL are prepended.&nbsp; Otherwise, the host, port, and path are prepended.</p><h4 class=CHeading>Parameters</h4><table border=0 cellspacing=0 cellpadding=0 class=CDescriptionList><tr><td class=CDLEntry>rootURL</td><td class=CDLDescription>URL used to resolve the URL specified by the url parameter, if url is relative.</td></tr><tr><td class=CDLEntry>url</td><td class=CDLDescription>URL to convert.&nbsp; </td></tr></table><h4 class=CHeading>Returns</h4><p>Fully-qualified URL.&nbsp; </p></div></div></div>

<div class="CFunction"><div class=CTopic><h3 class=CTitle><a name="URLUtil.isHttpURL"></a>isHttpURL</h3><div class=CBody><blockquote><table border=0 cellspacing=0 cellpadding=0 class="Prototype"><tr><td><table border=0 cellspacing=0 cellpadding=0><tr><td class="PBeforeParameters  prettyprint "nowrap>public static function isHttpURL(</td><td class="PParameter  prettyprint " nowrap>url:</td><td class="PType  prettyprint " nowrap>&nbsp;String</td><td class="PAfterParameters  prettyprint "nowrap>):Boolean</td></tr></table></td></tr></table></blockquote><p>Determines if the URL uses the HTTP, HTTPS, or RTMP protocol.</p><h4 class=CHeading>Parameters</h4><table border=0 cellspacing=0 cellpadding=0 class=CDescriptionList><tr><td class=CDLEntry>url</td><td class=CDLDescription>The URL to analyze.&nbsp; </td></tr></table><h4 class=CHeading>Returns</h4><p>true if the URL starts with &ldquo;http://&rdquo;, &ldquo;https://&rdquo;, or &ldquo;rtmp://&rdquo;.&nbsp; </p></div></div></div>

<div class="CFunction"><div class=CTopic><h3 class=CTitle><a name="URLUtil.isHttpsURL"></a>isHttpsURL</h3><div class=CBody><blockquote><table border=0 cellspacing=0 cellpadding=0 class="Prototype"><tr><td><table border=0 cellspacing=0 cellpadding=0><tr><td class="PBeforeParameters  prettyprint "nowrap>public static function isHttpsURL(</td><td class="PParameter  prettyprint " nowrap>url:</td><td class="PType  prettyprint " nowrap>&nbsp;String</td><td class="PAfterParameters  prettyprint "nowrap>):Boolean</td></tr></table></td></tr></table></blockquote><p>Determines if the URL uses the secure HTTPS protocol.</p><h4 class=CHeading>Parameters</h4><table border=0 cellspacing=0 cellpadding=0 class=CDescriptionList><tr><td class=CDLEntry>url</td><td class=CDLDescription>The URL to analyze.&nbsp; </td></tr></table><h4 class=CHeading>Returns</h4><p>true if the URL starts with &ldquo;https://&rdquo;.&nbsp; </p></div></div></div>

<div class="CFunction"><div class=CTopic><h3 class=CTitle><a name="URLUtil.getProtocol"></a>getProtocol</h3><div class=CBody><blockquote><table border=0 cellspacing=0 cellpadding=0 class="Prototype"><tr><td><table border=0 cellspacing=0 cellpadding=0><tr><td class="PBeforeParameters  prettyprint "nowrap>public static function getProtocol(</td><td class="PParameter  prettyprint " nowrap>url:</td><td class="PType  prettyprint " nowrap>&nbsp;String</td><td class="PAfterParameters  prettyprint "nowrap>):String</td></tr></table></td></tr></table></blockquote><p>Returns the protocol section of the specified URL.&nbsp; The following examples show what is returned based on different URLs: </p><blockquote><pre>getProtocol(&quot;https://localhost:2700/&quot;) returns &quot;https&quot;
getProtocol(&quot;rtmp://www.myCompany.com/myMainDirectory/groupChatApp/HelpDesk&quot;) returns &quot;rtmp&quot;
getProtocol(&quot;rtmpt:/sharedWhiteboardApp/June2002&quot;) returns &quot;rtmpt&quot;
getProtocol(&quot;rtmp::1234/chatApp/room_name&quot;) returns &quot;rtmp&quot;</pre></blockquote><h4 class=CHeading>Parameters</h4><table border=0 cellspacing=0 cellpadding=0 class=CDescriptionList><tr><td class=CDLEntry>url</td><td class=CDLDescription>String containing the URL to parse.&nbsp; </td></tr></table><h4 class=CHeading>Returns</h4><p>The protocol or an empty String if no protocol is specified.&nbsp; </p></div></div></div>

<div class="CFunction"><div class=CTopic><h3 class=CTitle><a name="URLUtil.replaceProtocol"></a>replaceProtocol</h3><div class=CBody><blockquote><table border=0 cellspacing=0 cellpadding=0 class="Prototype"><tr><td><table border=0 cellspacing=0 cellpadding=0><tr><td class="PBeforeParameters  prettyprint "nowrap>public static function replaceProtocol(</td><td class="PParameter  prettyprint " nowrap>uri:</td><td class="PType  prettyprint " nowrap>&nbsp;String,</td></tr><tr><td></td><td class="PParameter  prettyprint " nowrap>newProtocol:</td><td class="PType  prettyprint " nowrap>&nbsp;String</td><td class="PAfterParameters  prettyprint "nowrap>):String</td></tr></table></td></tr></table></blockquote><p>Replaces the protocol of the specified URI with the given protocol.</p><h4 class=CHeading>Parameters</h4><table border=0 cellspacing=0 cellpadding=0 class=CDescriptionList><tr><td class=CDLEntry>uri</td><td class=CDLDescription>String containing the URI in which the protocol needs to be replaced.&nbsp; </td></tr><tr><td class=CDLEntry>newProtocol</td><td class=CDLDescription>String containing the new protocol to use.&nbsp; </td></tr></table><h4 class=CHeading>Returns</h4><p>The URI with the protocol replaced, or an empty String if the URI does not contain a protocol.&nbsp; </p></div></div></div>

<div class="CFunction"><div class=CTopic><h3 class=CTitle><a name="URLUtil.replacePort"></a>replacePort</h3><div class=CBody><blockquote><table border=0 cellspacing=0 cellpadding=0 class="Prototype"><tr><td><table border=0 cellspacing=0 cellpadding=0><tr><td class="PBeforeParameters  prettyprint "nowrap>public static function replacePort(</td><td class="PParameter  prettyprint " nowrap>uri:</td><td class="PType  prettyprint " nowrap>&nbsp;String,</td></tr><tr><td></td><td class="PParameter  prettyprint " nowrap>newPort:</td><td class="PType  prettyprint " nowrap>&nbsp;uint</td><td class="PAfterParameters  prettyprint "nowrap>):String</td></tr></table></td></tr></table></blockquote><p>Returns a new String with the port replaced with the specified port.&nbsp; If there is no port in the specified URI, the port is inserted.&nbsp; This method expects that a protocol has been specified within the URI.</p><h4 class=CHeading>Parameters</h4><table border=0 cellspacing=0 cellpadding=0 class=CDescriptionList><tr><td class=CDLEntry>uri</td><td class=CDLDescription>String containing the URI in which the port is replaced.</td></tr><tr><td class=CDLEntry>newPort</td><td class=CDLDescription>uint containing the new port to subsitute.&nbsp; </td></tr></table><h4 class=CHeading>Returns</h4><p>The URI with the new port.&nbsp; </p></div></div></div>

<div class="CFunction"><div class=CTopic><h3 class=CTitle><a name="URLUtil.replaceTokens"></a>replaceTokens</h3><div class=CBody><blockquote><table border=0 cellspacing=0 cellpadding=0 class="Prototype"><tr><td><table border=0 cellspacing=0 cellpadding=0><tr><td class="PBeforeParameters  prettyprint "nowrap>public static function replaceTokens(</td><td class="PParameter  prettyprint " nowrap>url:</td><td class="PType  prettyprint " nowrap>&nbsp;String</td><td class="PAfterParameters  prettyprint "nowrap>):String</td></tr></table></td></tr></table></blockquote><p>Returns a new String with the port and server tokens replaced with the port and server from the currently running application.</p><h4 class=CHeading>Parameters</h4><table border=0 cellspacing=0 cellpadding=0 class=CDescriptionList><tr><td class=CDLEntry>url</td><td class=CDLDescription>String containing the SERVER_NAME_TOKEN and/or SERVER_NAME_PORT which should be replaced by the port and server from the application.&nbsp; </td></tr></table><h4 class=CHeading>Returns</h4><p>The URI with the port and server replaced.&nbsp; </p></div></div></div>

<div class="CFunction"><div class=CTopic><h3 class=CTitle><a name="URLUtil.urisEqual"></a>urisEqual</h3><div class=CBody><blockquote><table border=0 cellspacing=0 cellpadding=0 class="Prototype"><tr><td><table border=0 cellspacing=0 cellpadding=0><tr><td class="PBeforeParameters  prettyprint "nowrap>public static function urisEqual(</td><td class="PParameter  prettyprint " nowrap>uri1:</td><td class="PType  prettyprint " nowrap>&nbsp;String,</td></tr><tr><td></td><td class="PParameter  prettyprint " nowrap>uri2:</td><td class="PType  prettyprint " nowrap>&nbsp;String</td><td class="PAfterParameters  prettyprint "nowrap>):Boolean</td></tr></table></td></tr></table></blockquote><p>Tests whether two URI Strings are equivalent, ignoring case and differences in trailing slashes.</p><h4 class=CHeading>Parameters</h4><table border=0 cellspacing=0 cellpadding=0 class=CDescriptionList><tr><td class=CDLEntry>uri1</td><td class=CDLDescription>The first URI to compare.</td></tr><tr><td class=CDLEntry>uri2</td><td class=CDLDescription>The second URI to compare.&nbsp; </td></tr></table><h4 class=CHeading>Returns</h4><p>true if the URIs are equal.&nbsp; Otherwise, false.&nbsp; </p></div></div></div>

<div class="CFunction"><div class=CTopic><h3 class=CTitle><a name="URLUtil.trim"></a>trim</h3><div class=CBody><blockquote><table border=0 cellspacing=0 cellpadding=0 class="Prototype"><tr><td><table border=0 cellspacing=0 cellpadding=0><tr><td class="PBeforeParameters  prettyprint "nowrap>public static function trim(</td><td class="PParameter  prettyprint " nowrap>str:</td><td class="PType  prettyprint " nowrap>&nbsp;String</td><td class="PAfterParameters  prettyprint "nowrap>):String</td></tr></table></td></tr></table></blockquote><p>Removes all whitespace characters from the beginning and end of the specified string.</p><h4 class=CHeading>Parameters</h4><table border=0 cellspacing=0 cellpadding=0 class=CDescriptionList><tr><td class=CDLEntry>str</td><td class=CDLDescription>The String whose whitespace should be trimmed.&nbsp; </td></tr></table><h4 class=CHeading>Returns</h4><p>Updated String where whitespace was removed from the beginning and end.&nbsp; </p></div></div></div>

<div class="CFunction"><div class=CTopic><h3 class=CTitle><a name="URLUtil.isWhitespace"></a>isWhitespace</h3><div class=CBody><blockquote><table border=0 cellspacing=0 cellpadding=0 class="Prototype"><tr><td><table border=0 cellspacing=0 cellpadding=0><tr><td class="PBeforeParameters  prettyprint "nowrap>public static function isWhitespace(</td><td class="PParameter  prettyprint " nowrap>character:</td><td class="PType  prettyprint " nowrap>&nbsp;String</td><td class="PAfterParameters  prettyprint "nowrap>):Boolean</td></tr></table></td></tr></table></blockquote><p>Returns true if the specified string is a single space, tab, carriage return, newline, or formfeed character.</p><h4 class=CHeading>Parameters</h4><table border=0 cellspacing=0 cellpadding=0 class=CDescriptionList><tr><td class=CDLEntry>str</td><td class=CDLDescription>The String that is is being queried.&nbsp; </td></tr></table><h4 class=CHeading>Returns</h4><p>true if the specified string is a single space, tab, carriage return, newline, or formfeed character.&nbsp; </p></div></div></div>

<div class="CFunction"><div class=CTopic><h3 class=CTitle><a name="URLUtil.hasUnresolvableTokens"></a>hasUnresolvableTokens</h3><div class=CBody><blockquote><table border=0 cellspacing=0 cellpadding=0 class="Prototype"><tr><td class="prettyprint">public static function hasUnresolvableTokens():Boolean</td></tr></table></blockquote><p>If the LoaderConfig.url property is not available, the replaceTokens() method will not replace the server name and port properties properly.</p><h4 class=CHeading>Returns</h4><p>true if the LoaderConfig.url property is not available.&nbsp; Otherwise, false.&nbsp; </p></div></div></div>

<div class="CGroup"><div class=CTopic><h3 class=CTitle><a name="URLUtil.Constants"></a>Constants</h3></div></div>

<div class="CConstant"><div class=CTopic><h3 class=CTitle><a name="URLUtil.SERVER_NAME_TOKEN"></a>SERVER_NAME_TOKEN</h3><div class=CBody><blockquote><table border=0 cellspacing=0 cellpadding=0 class="Prototype"><tr><td class="prettyprint">public static const SERVER_NAME_TOKEN: String</td></tr></table></blockquote><p>The pattern in the String that is passed to the &lt;code&gt;replaceTokens()&lt;/code&gt; method that is replaced by the application&rsquo;s server name.</p></div></div></div>

<div class="CConstant"><div class=CTopic><h3 class=CTitle><a name="URLUtil.SERVER_PORT_TOKEN"></a>SERVER_PORT_TOKEN</h3><div class=CBody><blockquote><table border=0 cellspacing=0 cellpadding=0 class="Prototype"><tr><td class="prettyprint">public static const SERVER_PORT_TOKEN: String</td></tr></table></blockquote><p>The pattern in the String that is passed to the &lt;code&gt;replaceTokens()&lt;/code&gt; method that is replaced by the application&rsquo;s port.</p></div></div></div>

<div class="CGroup"><div class=CTopic><h3 class=CTitle><a name="URLUtil.Functions"></a>Functions</h3></div></div>

<div class="CFunction"><div class=CTopic><h3 class=CTitle><a name="URLUtil.objectToString"></a>objectToString</h3><div class=CBody><blockquote><table border=0 cellspacing=0 cellpadding=0 class="Prototype"><tr><td><table border=0 cellspacing=0 cellpadding=0><tr><td class="PBeforeParameters  prettyprint "nowrap>public static function objectToString(</td><td class="PParameter  prettyprint " nowrap>object:</td><td class="PType  prettyprint " nowrap>&nbsp;Object,</td><td class="PDefaultValuePrefix  prettyprint ">&nbsp;&nbsp;</td><td class="PDefaultValue  prettyprint " width=100%></td></tr><tr><td></td><td class="PParameter  prettyprint " nowrap>separator:</td><td class="PType  prettyprint " nowrap>&nbsp;String</td><td class="PDefaultValuePrefix  prettyprint ">&nbsp;=&nbsp;</td><td class="PDefaultValue  prettyprint " width=100%>';',</td></tr><tr><td></td><td class="PParameter  prettyprint " nowrap>encodeURL:</td><td class="PType  prettyprint " nowrap>&nbsp;Boolean</td><td class="PDefaultValuePrefix  prettyprint ">&nbsp;=&nbsp;</td><td class="PDefaultValue  prettyprint " width=100%>true</td><td class="PAfterParameters  prettyprint "nowrap>):String</td></tr></table></td></tr></table></blockquote><p>Enumerates an object&rsquo;s dynamic properties (by using a for..in loop) and returns a String.&nbsp; You typically use this method to convert an ActionScript object to a String that you then append to the end of a URL.&nbsp; By default, invalid URL characters are URL-encoded (converted to the %XX format).&nbsp; </p><p>For example: </p><blockquote><pre>var o:Object = { name: &quot;Alex&quot;, age: 21 };
var s:String = URLUtil.objectToString(o,&quot;;&quot;,true);
trace(s);</pre></blockquote><p>Prints &ldquo;name=Alex;age=21&rdquo; to the trace log.&nbsp; </p><h4 class=CHeading>Parameters</h4><table border=0 cellspacing=0 cellpadding=0 class=CDescriptionList><tr><td class=CDLEntry>object</td><td class=CDLDescription>The object to convert to a String.</td></tr><tr><td class=CDLEntry>separator</td><td class=CDLDescription>The character that separates each of the object&rsquo;s property:value pair in the String.</td></tr><tr><td class=CDLEntry>encodeURL</td><td class=CDLDescription>Whether or not to URL-encode the String.&nbsp; </td></tr></table><h4 class=CHeading>Returns</h4><p>The object that was passed to the method.&nbsp; </p></div></div></div>

<div class="CFunction"><div class=CTopic><h3 class=CTitle><a name="URLUtil.internalObjectToString"></a>internalObjectToString</h3><div class=CBody><blockquote><table border=0 cellspacing=0 cellpadding=0 class="Prototype"><tr><td><table border=0 cellspacing=0 cellpadding=0><tr><td class="PBeforeParameters  prettyprint "nowrap>private static function internalObjectToString(</td><td class="PParameter  prettyprint " nowrap>object:</td><td class="PType  prettyprint " nowrap>&nbsp;Object,</td></tr><tr><td></td><td class="PParameter  prettyprint " nowrap>separator:</td><td class="PType  prettyprint " nowrap>&nbsp;String,</td></tr><tr><td></td><td class="PParameter  prettyprint " nowrap>prefix:</td><td class="PType  prettyprint " nowrap>&nbsp;String,</td></tr><tr><td></td><td class="PParameter  prettyprint " nowrap>encodeURL:</td><td class="PType  prettyprint " nowrap>&nbsp;Boolean</td><td class="PAfterParameters  prettyprint "nowrap>):String</td></tr></table></td></tr></table></blockquote></div></div></div>

<div class="CFunction"><div class=CTopic><h3 class=CTitle><a name="URLUtil.internalArrayToString"></a>internalArrayToString</h3><div class=CBody><blockquote><table border=0 cellspacing=0 cellpadding=0 class="Prototype"><tr><td><table border=0 cellspacing=0 cellpadding=0><tr><td class="PBeforeParameters  prettyprint "nowrap>private static function internalArrayToString(</td><td class="PParameter  prettyprint " nowrap>array:</td><td class="PType  prettyprint " nowrap>&nbsp;Array,</td></tr><tr><td></td><td class="PParameter  prettyprint " nowrap>separator:</td><td class="PType  prettyprint " nowrap>&nbsp;String,</td></tr><tr><td></td><td class="PParameter  prettyprint " nowrap>prefix:</td><td class="PType  prettyprint " nowrap>&nbsp;String,</td></tr><tr><td></td><td class="PParameter  prettyprint " nowrap>encodeURL:</td><td class="PType  prettyprint " nowrap>&nbsp;Boolean</td><td class="PAfterParameters  prettyprint "nowrap>):String</td></tr></table></td></tr></table></blockquote></div></div></div>

<div class="CFunction"><div class=CTopic><h3 class=CTitle><a name="URLUtil.stringToObject"></a>stringToObject</h3><div class=CBody><blockquote><table border=0 cellspacing=0 cellpadding=0 class="Prototype"><tr><td><table border=0 cellspacing=0 cellpadding=0><tr><td class="PBeforeParameters  prettyprint "nowrap>public static function stringToObject(</td><td class="PParameter  prettyprint " nowrap>string:</td><td class="PType  prettyprint " nowrap>&nbsp;String,</td><td class="PDefaultValuePrefix  prettyprint ">&nbsp;&nbsp;</td><td class="PDefaultValue  prettyprint " width=100%></td></tr><tr><td></td><td class="PParameter  prettyprint " nowrap>separator:</td><td class="PType  prettyprint " nowrap>&nbsp;String</td><td class="PDefaultValuePrefix  prettyprint ">&nbsp;=&nbsp;</td><td class="PDefaultValue  prettyprint " width=100%>&quot;;&quot;,</td></tr><tr><td></td><td class="PParameter  prettyprint " nowrap>decodeURL:</td><td class="PType  prettyprint " nowrap>&nbsp;Boolean</td><td class="PDefaultValuePrefix  prettyprint ">&nbsp;=&nbsp;</td><td class="PDefaultValue  prettyprint " width=100%>true</td><td class="PAfterParameters  prettyprint "nowrap>):Object</td></tr></table></td></tr></table></blockquote><p>Returns an object from a String.&nbsp; The String contains name=value pairs, which become dynamic properties of the returned object.&nbsp; These property pairs are separated by the specified separator.&nbsp; This method converts Numbers and Booleans, Arrays (defined by &ldquo;[]&rdquo;), and sub-objects (defined by &ldquo;{}&rdquo;).&nbsp; By default, URL patterns of the format %XX are converted to the appropriate String character.&nbsp; </p><p>For example: </p><blockquote><pre>var s:String = &quot;name=Alex;age=21&quot;;
var o:Object = URLUtil.stringToObject(s, &quot;;&quot;, true);</pre></blockquote><p>Returns the object: { name: &ldquo;Alex&rdquo;, age: 21 }.&nbsp; </p><h4 class=CHeading>Parameters</h4><table border=0 cellspacing=0 cellpadding=0 class=CDescriptionList><tr><td class=CDLEntry>string</td><td class=CDLDescription>The String to convert to an object.</td></tr><tr><td class=CDLEntry>separator</td><td class=CDLDescription>The character that separates name=value pairs in the String.</td></tr><tr><td class=CDLEntry>decodeURL</td><td class=CDLDescription>Whether or not to decode URL-encoded characters in the String.&nbsp; </td></tr></table><h4 class=CHeading>Returns</h4><p>The object containing properties and values extracted from the String passed to this method.&nbsp; </p></div></div></div>

<div class="CGroup"><div class=CTopic><h3 class=CTitle><a name="URLUtil.Constants"></a>Constants</h3></div></div>

<div class="CConstant"><div class=CTopic><h3 class=CTitle><a name="URLUtil.SERVER_NAME_REGEX"></a>SERVER_NAME_REGEX</h3><div class=CBody><blockquote><table border=0 cellspacing=0 cellpadding=0 class="Prototype"><tr><td class="prettyprint">private static const SERVER_NAME_REGEX: RegExp</td></tr></table></blockquote></div></div></div>

<div class="CConstant"><div class=CTopic><h3 class=CTitle><a name="URLUtil.SERVER_PORT_REGEX"></a>SERVER_PORT_REGEX</h3><div class=CBody><blockquote><table border=0 cellspacing=0 cellpadding=0 class="Prototype"><tr><td class="prettyprint">private static const SERVER_PORT_REGEX: RegExp</td></tr></table></blockquote></div></div></div>

</div><!--Content-->


<div id=Footer><a href="http://www.naturaldocs.org">Generated by Natural Docs</a></div><!--Footer-->


<div id=Menu><div class=MEntry><div class=MFile><a href="../../../Main-as.html">Main</a></div></div><div class=MEntry><div class=MGroup><a href="javascript:ToggleMenu('MGroupContent2')">Org</a><div class=MGroupContent id=MGroupContent2><div class=MEntry><div class=MFile><a href="LoaderConfig-as.html">LoaderConfig</a></div></div><div class=MEntry><div class=MGroup><a href="javascript:ToggleMenu('MGroupContent1')">Model</a><div class=MGroupContent id=MGroupContent1><div class=MEntry><div class=MFile><a href="../model/HTTPCookie-as.html">HTTPCookie</a></div></div><div class=MEntry><div class=MFile><a href="../model/HTTPResponse-as.html">HTTPResponse</a></div></div><div class=MEntry><div class=MFile><a href="../model/HTTPResponseHeader-as.html">HTTPResponseHeader</a></div></div><div class=MEntry><div class=MFile><a href="../model/SOCKS5Model-as.html">SOCKS5Model</a></div></div><div class=MEntry><div class=MFile><a href="../model/TorASError-as.html">TorASError</a></div></div><div class=MEntry><div class=MFile><a href="../model/TorControlCircuit-as.html">TorControlCircuit</a></div></div><div class=MEntry><div class=MFile><a href="../model/TorControlCircuitHop-as.html">TorControlCircuitHop</a></div></div><div class=MEntry><div class=MFile><a href="../model/TorControlModel-as.html">TorControlModel</a></div></div></div></div></div><div class=MEntry><div class=MFile><a href="../SOCKS5Tunnel-as.html">SOCKS5Tunnel</a></div></div><div class=MEntry><div class=MFile><a href="../events/SOCKS5TunnelEvent-as.html">SOCKS5TunnelEvent</a></div></div><div class=MEntry><div class=MFile><a href="../TorControl-as.html">TorControl</a></div></div><div class=MEntry><div class=MFile><a href="../events/TorControlEvent-as.html">TorControlEvent</a></div></div><div class=MEntry><div class=MFile id=MSelected>URLUtil</div></div></div></div></div><div class=MEntry><div class=MGroup><a href="javascript:ToggleMenu('MGroupContent3')">Demos</a><div class=MGroupContent id=MGroupContent3><div class=MEntry><div class=MFile><a href="../../../demos/CircuitsDemo-as.html">CircuitsDemo</a></div></div><div class=MEntry><div class=MFile><a href="../../../demos/HTTPLoadDemo-as.html">HTTPLoadDemo</a></div></div><div class=MEntry><div class=MFile><a href="../../../demos/HTTPSLoadDemo-as.html">HTTPSLoadDemo</a></div></div></div></div></div><div class=MEntry><div class=MGroup><a href="javascript:ToggleMenu('MGroupContent13')">Com</a><div class=MGroupContent id=MGroupContent13><div class=MEntry><div class=MGroup><a href="javascript:ToggleMenu('MGroupContent9')">Crypto</a><div class=MGroupContent id=MGroupContent9><div class=MEntry><div class=MGroup><a href="javascript:ToggleMenu('MGroupContent4')">Cert</a><div class=MGroupContent id=MGroupContent4><div class=MEntry><div class=MFile><a href="../../../com/hurlant/crypto/cert/MozillaRootCertificates-as.html">MozillaRootCertificates</a></div></div><div class=MEntry><div class=MFile><a href="../../../com/hurlant/crypto/cert/X509Certificate-as.html">X509Certificate</a></div></div><div class=MEntry><div class=MFile><a href="../../../com/hurlant/crypto/cert/X509CertificateCollection-as.html">X509CertificateCollection</a></div></div></div></div></div><div class=MEntry><div class=MFile><a href="../../../com/hurlant/crypto/Crypto-as.html">Crypto</a></div></div><div class=MEntry><div class=MGroup><a href="javascript:ToggleMenu('MGroupContent5')">Hash</a><div class=MGroupContent id=MGroupContent5><div class=MEntry><div class=MFile><a href="../../../com/hurlant/crypto/hash/HMAC-as.html">HMAC</a></div></div><div class=MEntry><div class=MFile><a href="../../../com/hurlant/crypto/hash/IHash-as.html">IHash</a></div></div><div class=MEntry><div class=MFile><a href="../../../com/hurlant/crypto/hash/MD2-as.html">MD2</a></div></div><div class=MEntry><div class=MFile><a href="../../../com/hurlant/crypto/hash/MD5-as.html">MD5</a></div></div><div class=MEntry><div class=MFile><a href="../../../com/hurlant/crypto/hash/SHA1-as.html">SHA1</a></div></div><div class=MEntry><div class=MFile><a href="../../../com/hurlant/crypto/hash/SHA224-as.html">SHA224</a></div></div><div class=MEntry><div class=MFile><a href="../../../com/hurlant/crypto/hash/SHA256-as.html">SHA256</a></div></div><div class=MEntry><div class=MFile><a href="../../../com/hurlant/crypto/hash/SHABase-as.html">SHABase</a></div></div></div></div></div><div class=MEntry><div class=MGroup><a href="javascript:ToggleMenu('MGroupContent6')">Prng</a><div class=MGroupContent id=MGroupContent6><div class=MEntry><div class=MFile><a href="../../../com/hurlant/crypto/prng/ARC4-as.html">ARC4</a></div></div><div class=MEntry><div class=MFile><a href="../../../com/hurlant/crypto/prng/IPRNG-as.html">IPRNG</a></div></div><div class=MEntry><div class=MFile><a href="../../../com/hurlant/crypto/prng/Random-as.html">Random</a></div></div><div class=MEntry><div class=MFile><a href="../../../com/hurlant/crypto/prng/TLSPRF-as.html">TLSPRF</a></div></div></div></div></div><div class=MEntry><div class=MFile><a href="../../../com/hurlant/crypto/rsa/RSAKey-as.html">RSAKey</a></div></div><div class=MEntry><div class=MGroup><a href="javascript:ToggleMenu('MGroupContent7')">Symmetric</a><div class=MGroupContent id=MGroupContent7><div class=MEntry><div class=MFile><a href="../../../com/hurlant/crypto/symmetric/AESKey-as.html">AESKey</a></div></div><div class=MEntry><div class=MFile><a href="../../../com/hurlant/crypto/symmetric/BlowFishKey-as.html">BlowFishKey</a></div></div><div class=MEntry><div class=MFile><a href="../../../com/hurlant/crypto/symmetric/CBCMode-as.html">CBCMode</a></div></div><div class=MEntry><div class=MFile><a href="../../../com/hurlant/crypto/symmetric/CFB8Mode-as.html">CFB8Mode</a></div></div><div class=MEntry><div class=MFile><a href="../../../com/hurlant/crypto/symmetric/CFBMode-as.html">CFBMode</a></div></div><div class=MEntry><div class=MFile><a href="../../../com/hurlant/crypto/symmetric/CTRMode-as.html">CTRMode</a></div></div><div class=MEntry><div class=MFile><a href="../../../com/hurlant/crypto/symmetric/DESKey-as.html">DESKey</a></div></div><div class=MEntry><div class=MFile><a href="../../../com/hurlant/crypto/symmetric/ECBMode-as.html">ECBMode</a></div></div><div class=MEntry><div class=MFile><a href="../../../com/hurlant/crypto/symmetric/ICipher-as.html">ICipher</a></div></div><div class=MEntry><div class=MFile><a href="../../../com/hurlant/crypto/symmetric/IMode-as.html">IMode</a></div></div><div class=MEntry><div class=MFile><a href="../../../com/hurlant/crypto/symmetric/IPad-as.html">IPad</a></div></div><div class=MEntry><div class=MFile><a href="../../../com/hurlant/crypto/symmetric/IStreamCipher-as.html">IStreamCipher</a></div></div><div class=MEntry><div class=MFile><a href="../../../com/hurlant/crypto/symmetric/ISymmetricKey-as.html">ISymmetricKey</a></div></div><div class=MEntry><div class=MFile><a href="../../../com/hurlant/crypto/symmetric/IVMode-as.html">IVMode</a></div></div><div class=MEntry><div class=MFile><a href="../../../com/hurlant/crypto/symmetric/NullPad-as.html">NullPad</a></div></div><div class=MEntry><div class=MFile><a href="../../../com/hurlant/crypto/symmetric/OFBMode-as.html">OFBMode</a></div></div><div class=MEntry><div class=MFile><a href="../../../com/hurlant/crypto/symmetric/PKCS5-as.html">PKCS5</a></div></div><div class=MEntry><div class=MFile><a href="../../../com/hurlant/crypto/symmetric/SimpleIVMode-as.html">SimpleIVMode</a></div></div><div class=MEntry><div class=MFile><a href="../../../com/hurlant/crypto/symmetric/TLSPad-as.html">TLSPad</a></div></div><div class=MEntry><div class=MFile><a href="../../../com/hurlant/crypto/symmetric/TripleDESKey-as.html">TripleDESKey</a></div></div><div class=MEntry><div class=MFile><a href="../../../com/hurlant/crypto/symmetric/XTeaKey-as.html">XTeaKey</a></div></div></div></div></div><div class=MEntry><div class=MGroup><a href="javascript:ToggleMenu('MGroupContent8')">Tls</a><div class=MGroupContent id=MGroupContent8><div class=MEntry><div class=MFile><a href="../../../com/hurlant/crypto/tls/BulkCiphers-as.html">BulkCiphers</a></div></div><div class=MEntry><div class=MFile><a href="../../../com/hurlant/crypto/tls/CipherSuites-as.html">CipherSuites</a></div></div><div class=MEntry><div class=MFile><a href="../../../com/hurlant/crypto/tls/KeyExchanges-as.html">KeyExchanges</a></div></div><div class=MEntry><div class=MFile><a href="../../../com/hurlant/crypto/tls/MACs-as.html">MACs</a></div></div><div class=MEntry><div class=MFile><a href="../../../com/hurlant/crypto/tls/TLSConfig-as.html">TLSConfig</a></div></div><div class=MEntry><div class=MFile><a href="../../../com/hurlant/crypto/tls/TLSConnectionState-as.html">TLSConnectionState</a></div></div><div class=MEntry><div class=MFile><a href="../../../com/hurlant/crypto/tls/TLSEngine-as.html">TLSEngine</a></div></div><div class=MEntry><div class=MFile><a href="../../../com/hurlant/crypto/tls/TLSError-as.html">TLSError</a></div></div><div class=MEntry><div class=MFile><a href="../../../com/hurlant/crypto/tls/TLSEvent-as.html">TLSEvent</a></div></div><div class=MEntry><div class=MFile><a href="../../../com/hurlant/crypto/tls/TLSSecurityParameters-as.html">TLSSecurityParameters</a></div></div><div class=MEntry><div class=MFile><a href="../../../com/hurlant/crypto/tls/TLSSocket-as.html">TLSSocket</a></div></div><div class=MEntry><div class=MFile><a href="../../../com/hurlant/crypto/tls/TLSTest-as.html">TLSTest</a></div></div></div></div></div></div></div></div><div class=MEntry><div class=MGroup><a href="javascript:ToggleMenu('MGroupContent10')">Math</a><div class=MGroupContent id=MGroupContent10><div class=MEntry><div class=MFile><a href="../../../com/hurlant/math/BarrettReduction-as.html">BarrettReduction</a></div></div><div class=MEntry><div class=MFile><a href="../../../com/hurlant/math/BigInteger-as.html">BigInteger</a></div></div><div class=MEntry><div class=MFile><a href="../../../com/hurlant/math/ClassicReduction-as.html">ClassicReduction</a></div></div><div class=MEntry><div class=MFile><a href="../../../com/hurlant/math/IReduction-as.html">IReduction</a></div></div><div class=MEntry><div class=MFile><a href="../../../com/hurlant/math/MontgomeryReduction-as.html">MontgomeryReduction</a></div></div><div class=MEntry><div class=MFile><a href="../../../com/hurlant/math/NullReduction-as.html">NullReduction</a></div></div></div></div></div><div class=MEntry><div class=MGroup><a href="javascript:ToggleMenu('MGroupContent12')">Util</a><div class=MGroupContent id=MGroupContent12><div class=MEntry><div class=MFile><a href="../../../com/hurlant/util/ArrayUtil-as.html">ArrayUtil</a></div></div><div class=MEntry><div class=MFile><a href="../../../com/hurlant/util/Base64-as.html">Base64</a></div></div><div class=MEntry><div class=MGroup><a href="javascript:ToggleMenu('MGroupContent11')">Der</a><div class=MGroupContent id=MGroupContent11><div class=MEntry><div class=MFile><a href="../../../com/hurlant/util/der/ByteString-as.html">ByteString</a></div></div><div class=MEntry><div class=MFile><a href="../../../com/hurlant/util/der/DER-as.html">DER</a></div></div><div class=MEntry><div class=MFile><a href="../../../com/hurlant/util/der/IAsn1Type-as.html">IAsn1Type</a></div></div><div class=MEntry><div class=MFile><a href="../../../com/hurlant/util/der/Integer-as.html">Integer</a></div></div><div class=MEntry><div class=MFile><a href="../../../com/hurlant/util/der/ObjectIdentifier-as.html">ObjectIdentifier</a></div></div><div class=MEntry><div class=MFile><a href="../../../com/hurlant/util/der/OID-as.html">OID</a></div></div><div class=MEntry><div class=MFile><a href="../../../com/hurlant/util/der/PEM-as.html">PEM</a></div></div><div class=MEntry><div class=MFile><a href="../../../com/hurlant/util/der/PrintableString-as.html">PrintableString</a></div></div><div class=MEntry><div class=MFile><a href="../../../com/hurlant/util/der/Sequence-as.html">Sequence</a></div></div><div class=MEntry><div class=MFile><a href="../../../com/hurlant/util/der/Set-as.html">Set</a></div></div><div class=MEntry><div class=MFile><a href="../../../com/hurlant/util/der/Type-as.html">Type</a></div></div><div class=MEntry><div class=MFile><a href="../../../com/hurlant/util/der/UTCTime-as.html">UTCTime</a></div></div></div></div></div><div class=MEntry><div class=MFile><a href="../../../com/hurlant/util/Hex-as.html">Hex</a></div></div><div class=MEntry><div class=MFile><a href="../../../com/hurlant/util/Memory-as.html">Memory</a></div></div></div></div></div></div></div></div><div class=MEntry><div class=MGroup><a href="javascript:ToggleMenu('MGroupContent14')">Index</a><div class=MGroupContent id=MGroupContent14><div class=MEntry><div class=MIndex><a href="../../../../index/Classes.html">Classes</a></div></div><div class=MEntry><div class=MIndex><a href="../../../../index/Constants.html">Constants</a></div></div><div class=MEntry><div class=MIndex><a href="../../../../index/General.html">Everything</a></div></div><div class=MEntry><div class=MIndex><a href="../../../../index/Functions.html">Functions</a></div></div><div class=MEntry><div class=MIndex><a href="../../../../index/Interfaces.html">Interfaces</a></div></div><div class=MEntry><div class=MIndex><a href="../../../../index/Properties.html">Properties</a></div></div><div class=MEntry><div class=MIndex><a href="../../../../index/Variables.html">Variables</a></div></div></div></div></div><script type="text/javascript"><!--
var searchPanel = new SearchPanel("searchPanel", "HTML", "../../../../search");
--></script><div id=MSearchPanel class=MSearchPanelInactive><input type=text id=MSearchField value=Search onFocus="searchPanel.OnSearchFieldFocus(true)" onBlur="searchPanel.OnSearchFieldFocus(false)" onKeyUp="searchPanel.OnSearchFieldChange()"><select id=MSearchType onFocus="searchPanel.OnSearchTypeFocus(true)" onBlur="searchPanel.OnSearchTypeFocus(false)" onChange="searchPanel.OnSearchTypeChange()"><option  id=MSearchEverything selected value="General">Everything</option><option value="Classes">Classes</option><option value="Constants">Constants</option><option value="Functions">Functions</option><option value="Interfaces">Interfaces</option><option value="Properties">Properties</option><option value="Variables">Variables</option></select></div><script language=JavaScript><!--
HideAllBut([2, 1], 15);// --></script></div><!--Menu-->



<!--START_ND_TOOLTIPS-->
<div class=CToolTip id="tt1"><div class=CFunction><blockquote><table border=0 cellspacing=0 cellpadding=0 class="Prototype"><tr><td><table border=0 cellspacing=0 cellpadding=0><tr><td class="PBeforeParameters  prettyprint "nowrap>public static function getServerNameWithPort(</td><td class="PParameter  prettyprint " nowrap>url:</td><td class="PType  prettyprint " nowrap>&nbsp;String</td><td class="PAfterParameters  prettyprint "nowrap>):String</td></tr></table></td></tr></table></blockquote>Returns the domain and port information from the specified URL.</div></div><div class=CToolTip id="tt2"><div class=CFunction><blockquote><table border=0 cellspacing=0 cellpadding=0 class="Prototype"><tr><td><table border=0 cellspacing=0 cellpadding=0><tr><td class="PBeforeParameters  prettyprint "nowrap>public static function getServerName(</td><td class="PParameter  prettyprint " nowrap>url:</td><td class="PType  prettyprint " nowrap>&nbsp;String</td><td class="PAfterParameters  prettyprint "nowrap>):String</td></tr></table></td></tr></table></blockquote>Returns the server name from the specified URL.</div></div><div class=CToolTip id="tt3"><div class=CFunction><blockquote><table border=0 cellspacing=0 cellpadding=0 class="Prototype"><tr><td><table border=0 cellspacing=0 cellpadding=0><tr><td class="PBeforeParameters  prettyprint "nowrap>public static function getResourcePath(</td><td class="PParameter  prettyprint " nowrap>url:</td><td class="PType  prettyprint " nowrap>&nbsp;String</td><td class="PAfterParameters  prettyprint "nowrap>):String</td></tr></table></td></tr></table></blockquote>Returns the resource path portion (everything after protocol+domain+port) of the specified URL.</div></div><div class=CToolTip id="tt4"><div class=CFunction><blockquote><table border=0 cellspacing=0 cellpadding=0 class="Prototype"><tr><td><table border=0 cellspacing=0 cellpadding=0><tr><td class="PBeforeParameters  prettyprint "nowrap>public static function getPort(</td><td class="PParameter  prettyprint " nowrap>url:</td><td class="PType  prettyprint " nowrap>&nbsp;String</td><td class="PAfterParameters  prettyprint "nowrap>):uint</td></tr></table></td></tr></table></blockquote>Returns the port number from the specified URL.</div></div><div class=CToolTip id="tt5"><div class=CFunction><blockquote><table border=0 cellspacing=0 cellpadding=0 class="Prototype"><tr><td><table border=0 cellspacing=0 cellpadding=0><tr><td class="PBeforeParameters  prettyprint "nowrap>public static function getFullURL(</td><td class="PParameter  prettyprint " nowrap>rootURL:</td><td class="PType  prettyprint " nowrap>&nbsp;String,</td></tr><tr><td></td><td class="PParameter  prettyprint " nowrap>url:</td><td class="PType  prettyprint " nowrap>&nbsp;String</td><td class="PAfterParameters  prettyprint "nowrap>):String</td></tr></table></td></tr></table></blockquote>Converts a potentially relative URL to a fully-qualified URL. </div></div><div class=CToolTip id="tt6"><div class=CFunction><blockquote><table border=0 cellspacing=0 cellpadding=0 class="Prototype"><tr><td><table border=0 cellspacing=0 cellpadding=0><tr><td class="PBeforeParameters  prettyprint "nowrap>public static function isHttpURL(</td><td class="PParameter  prettyprint " nowrap>url:</td><td class="PType  prettyprint " nowrap>&nbsp;String</td><td class="PAfterParameters  prettyprint "nowrap>):Boolean</td></tr></table></td></tr></table></blockquote>Determines if the URL uses the HTTP, HTTPS, or RTMP protocol.</div></div><div class=CToolTip id="tt7"><div class=CFunction><blockquote><table border=0 cellspacing=0 cellpadding=0 class="Prototype"><tr><td><table border=0 cellspacing=0 cellpadding=0><tr><td class="PBeforeParameters  prettyprint "nowrap>public static function isHttpsURL(</td><td class="PParameter  prettyprint " nowrap>url:</td><td class="PType  prettyprint " nowrap>&nbsp;String</td><td class="PAfterParameters  prettyprint "nowrap>):Boolean</td></tr></table></td></tr></table></blockquote>Determines if the URL uses the secure HTTPS protocol.</div></div><div class=CToolTip id="tt8"><div class=CFunction><blockquote><table border=0 cellspacing=0 cellpadding=0 class="Prototype"><tr><td><table border=0 cellspacing=0 cellpadding=0><tr><td class="PBeforeParameters  prettyprint "nowrap>public static function getProtocol(</td><td class="PParameter  prettyprint " nowrap>url:</td><td class="PType  prettyprint " nowrap>&nbsp;String</td><td class="PAfterParameters  prettyprint "nowrap>):String</td></tr></table></td></tr></table></blockquote>Returns the protocol section of the specified URL. </div></div><div class=CToolTip id="tt9"><div class=CFunction><blockquote><table border=0 cellspacing=0 cellpadding=0 class="Prototype"><tr><td><table border=0 cellspacing=0 cellpadding=0><tr><td class="PBeforeParameters  prettyprint "nowrap>public static function replaceProtocol(</td><td class="PParameter  prettyprint " nowrap>uri:</td><td class="PType  prettyprint " nowrap>&nbsp;String,</td></tr><tr><td></td><td class="PParameter  prettyprint " nowrap>newProtocol:</td><td class="PType  prettyprint " nowrap>&nbsp;String</td><td class="PAfterParameters  prettyprint "nowrap>):String</td></tr></table></td></tr></table></blockquote>Replaces the protocol of the specified URI with the given protocol.</div></div><div class=CToolTip id="tt10"><div class=CFunction><blockquote><table border=0 cellspacing=0 cellpadding=0 class="Prototype"><tr><td><table border=0 cellspacing=0 cellpadding=0><tr><td class="PBeforeParameters  prettyprint "nowrap>public static function replacePort(</td><td class="PParameter  prettyprint " nowrap>uri:</td><td class="PType  prettyprint " nowrap>&nbsp;String,</td></tr><tr><td></td><td class="PParameter  prettyprint " nowrap>newPort:</td><td class="PType  prettyprint " nowrap>&nbsp;uint</td><td class="PAfterParameters  prettyprint "nowrap>):String</td></tr></table></td></tr></table></blockquote>Returns a new String with the port replaced with the specified port. </div></div><div class=CToolTip id="tt11"><div class=CFunction><blockquote><table border=0 cellspacing=0 cellpadding=0 class="Prototype"><tr><td><table border=0 cellspacing=0 cellpadding=0><tr><td class="PBeforeParameters  prettyprint "nowrap>public static function replaceTokens(</td><td class="PParameter  prettyprint " nowrap>url:</td><td class="PType  prettyprint " nowrap>&nbsp;String</td><td class="PAfterParameters  prettyprint "nowrap>):String</td></tr></table></td></tr></table></blockquote>Returns a new String with the port and server tokens replaced with the port and server from the currently running application.</div></div><div class=CToolTip id="tt12"><div class=CFunction><blockquote><table border=0 cellspacing=0 cellpadding=0 class="Prototype"><tr><td><table border=0 cellspacing=0 cellpadding=0><tr><td class="PBeforeParameters  prettyprint "nowrap>public static function urisEqual(</td><td class="PParameter  prettyprint " nowrap>uri1:</td><td class="PType  prettyprint " nowrap>&nbsp;String,</td></tr><tr><td></td><td class="PParameter  prettyprint " nowrap>uri2:</td><td class="PType  prettyprint " nowrap>&nbsp;String</td><td class="PAfterParameters  prettyprint "nowrap>):Boolean</td></tr></table></td></tr></table></blockquote>Tests whether two URI Strings are equivalent, ignoring case and differences in trailing slashes.</div></div><div class=CToolTip id="tt13"><div class=CFunction><blockquote><table border=0 cellspacing=0 cellpadding=0 class="Prototype"><tr><td><table border=0 cellspacing=0 cellpadding=0><tr><td class="PBeforeParameters  prettyprint "nowrap>public static function trim(</td><td class="PParameter  prettyprint " nowrap>str:</td><td class="PType  prettyprint " nowrap>&nbsp;String</td><td class="PAfterParameters  prettyprint "nowrap>):String</td></tr></table></td></tr></table></blockquote>Removes all whitespace characters from the beginning and end of the specified string.</div></div><div class=CToolTip id="tt14"><div class=CFunction><blockquote><table border=0 cellspacing=0 cellpadding=0 class="Prototype"><tr><td><table border=0 cellspacing=0 cellpadding=0><tr><td class="PBeforeParameters  prettyprint "nowrap>public static function isWhitespace(</td><td class="PParameter  prettyprint " nowrap>character:</td><td class="PType  prettyprint " nowrap>&nbsp;String</td><td class="PAfterParameters  prettyprint "nowrap>):Boolean</td></tr></table></td></tr></table></blockquote>Returns true if the specified string is a single space, tab, carriage return, newline, or formfeed character.</div></div><div class=CToolTip id="tt15"><div class=CFunction><blockquote><table border=0 cellspacing=0 cellpadding=0 class="Prototype"><tr><td class="prettyprint">public static function hasUnresolvableTokens():Boolean</td></tr></table></blockquote>If the LoaderConfig.url property is not available, the replaceTokens() method will not replace the server name and port properties properly.</div></div><div class=CToolTip id="tt16"><div class=CConstant><blockquote><table border=0 cellspacing=0 cellpadding=0 class="Prototype"><tr><td class="prettyprint">public static const SERVER_NAME_TOKEN: String</td></tr></table></blockquote>The pattern in the String that is passed to the code&gt;replaceTokens()&lt;/code method that is replaced by the application&rsquo;s server name.</div></div><div class=CToolTip id="tt17"><div class=CConstant><blockquote><table border=0 cellspacing=0 cellpadding=0 class="Prototype"><tr><td class="prettyprint">public static const SERVER_PORT_TOKEN: String</td></tr></table></blockquote>The pattern in the String that is passed to the code&gt;replaceTokens()&lt;/code method that is replaced by the application&rsquo;s port.</div></div><div class=CToolTip id="tt18"><div class=CFunction><blockquote><table border=0 cellspacing=0 cellpadding=0 class="Prototype"><tr><td><table border=0 cellspacing=0 cellpadding=0><tr><td class="PBeforeParameters  prettyprint "nowrap>public static function objectToString(</td><td class="PParameter  prettyprint " nowrap>object:</td><td class="PType  prettyprint " nowrap>&nbsp;Object,</td><td class="PDefaultValuePrefix  prettyprint ">&nbsp;&nbsp;</td><td class="PDefaultValue  prettyprint " width=100%></td></tr><tr><td></td><td class="PParameter  prettyprint " nowrap>separator:</td><td class="PType  prettyprint " nowrap>&nbsp;String</td><td class="PDefaultValuePrefix  prettyprint ">&nbsp;=&nbsp;</td><td class="PDefaultValue  prettyprint " width=100%>';',</td></tr><tr><td></td><td class="PParameter  prettyprint " nowrap>encodeURL:</td><td class="PType  prettyprint " nowrap>&nbsp;Boolean</td><td class="PDefaultValuePrefix  prettyprint ">&nbsp;=&nbsp;</td><td class="PDefaultValue  prettyprint " width=100%>true</td><td class="PAfterParameters  prettyprint "nowrap>):String</td></tr></table></td></tr></table></blockquote>Enumerates an object&rsquo;s dynamic properties (by using a for..in loop) and returns a String. </div></div><div class=CToolTip id="tt19"><div class=CFunction><blockquote><table border=0 cellspacing=0 cellpadding=0 class="Prototype"><tr><td><table border=0 cellspacing=0 cellpadding=0><tr><td class="PBeforeParameters  prettyprint "nowrap>private static function internalObjectToString(</td><td class="PParameter  prettyprint " nowrap>object:</td><td class="PType  prettyprint " nowrap>&nbsp;Object,</td></tr><tr><td></td><td class="PParameter  prettyprint " nowrap>separator:</td><td class="PType  prettyprint " nowrap>&nbsp;String,</td></tr><tr><td></td><td class="PParameter  prettyprint " nowrap>prefix:</td><td class="PType  prettyprint " nowrap>&nbsp;String,</td></tr><tr><td></td><td class="PParameter  prettyprint " nowrap>encodeURL:</td><td class="PType  prettyprint " nowrap>&nbsp;Boolean</td><td class="PAfterParameters  prettyprint "nowrap>):String</td></tr></table></td></tr></table></blockquote></div></div><div class=CToolTip id="tt20"><div class=CFunction><blockquote><table border=0 cellspacing=0 cellpadding=0 class="Prototype"><tr><td><table border=0 cellspacing=0 cellpadding=0><tr><td class="PBeforeParameters  prettyprint "nowrap>private static function internalArrayToString(</td><td class="PParameter  prettyprint " nowrap>array:</td><td class="PType  prettyprint " nowrap>&nbsp;Array,</td></tr><tr><td></td><td class="PParameter  prettyprint " nowrap>separator:</td><td class="PType  prettyprint " nowrap>&nbsp;String,</td></tr><tr><td></td><td class="PParameter  prettyprint " nowrap>prefix:</td><td class="PType  prettyprint " nowrap>&nbsp;String,</td></tr><tr><td></td><td class="PParameter  prettyprint " nowrap>encodeURL:</td><td class="PType  prettyprint " nowrap>&nbsp;Boolean</td><td class="PAfterParameters  prettyprint "nowrap>):String</td></tr></table></td></tr></table></blockquote></div></div><div class=CToolTip id="tt21"><div class=CFunction><blockquote><table border=0 cellspacing=0 cellpadding=0 class="Prototype"><tr><td><table border=0 cellspacing=0 cellpadding=0><tr><td class="PBeforeParameters  prettyprint "nowrap>public static function stringToObject(</td><td class="PParameter  prettyprint " nowrap>string:</td><td class="PType  prettyprint " nowrap>&nbsp;String,</td><td class="PDefaultValuePrefix  prettyprint ">&nbsp;&nbsp;</td><td class="PDefaultValue  prettyprint " width=100%></td></tr><tr><td></td><td class="PParameter  prettyprint " nowrap>separator:</td><td class="PType  prettyprint " nowrap>&nbsp;String</td><td class="PDefaultValuePrefix  prettyprint ">&nbsp;=&nbsp;</td><td class="PDefaultValue  prettyprint " width=100%>&quot;;&quot;,</td></tr><tr><td></td><td class="PParameter  prettyprint " nowrap>decodeURL:</td><td class="PType  prettyprint " nowrap>&nbsp;Boolean</td><td class="PDefaultValuePrefix  prettyprint ">&nbsp;=&nbsp;</td><td class="PDefaultValue  prettyprint " width=100%>true</td><td class="PAfterParameters  prettyprint "nowrap>):Object</td></tr></table></td></tr></table></blockquote>Returns an object from a String. </div></div><div class=CToolTip id="tt22"><div class=CConstant><blockquote><table border=0 cellspacing=0 cellpadding=0 class="Prototype"><tr><td class="prettyprint">private static const SERVER_NAME_REGEX: RegExp</td></tr></table></blockquote></div></div><div class=CToolTip id="tt23"><div class=CConstant><blockquote><table border=0 cellspacing=0 cellpadding=0 class="Prototype"><tr><td class="prettyprint">private static const SERVER_PORT_REGEX: RegExp</td></tr></table></blockquote></div></div><!--END_ND_TOOLTIPS-->




<div id=MSearchResultsWindow><iframe src="" frameborder=0 name=MSearchResults id=MSearchResults></iframe><a href="javascript:searchPanel.CloseResultsWindow()" id=MSearchResultsWindowClose>Close</a></div>


<script language=JavaScript><!--
if (browserType) {if (browserVer) {document.write("</div>"); }document.write("</div>");}// --></script></body></html>